package com.example.demotest.demotest.aspect;

import com.example.demotest.demotest.handler.AnnotationRangeValidatorHandler;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.*;

@Target({ElementType.METHOD, ElementType.FIELD, ElementType.ANNOTATION_TYPE, ElementType.CONSTRUCTOR, ElementType.PARAMETER, ElementType.TYPE_USE})
@Retention(RetentionPolicy.RUNTIME)
@Constraint(validatedBy = AnnotationRangeValidatorHandler.class)
@Documented
public @interface AnnotationRange {
    String message() default "数字不在可选范围内";

    Class<?> []groups() default {};

    Class<? extends Payload> [] payload() default {};
}
